fix: repair 4 cross-package bugs to make test suite pass - #95
Open
stooit wants to merge 1 commit into
Open
Conversation
- utils: re-export useDebounce as useSearchDebounce and fix useThrottle import so @e2e/utils exposes the names api.ts consumes - ui/Button: forward aria-label on icon-only buttons (WCAG 2.2 SC 4.1.2) - ui/DataTable: use functional setState in sort handler to avoid a latent stale-closure (opportunistic hardening; semantically equivalent) - utils/date: strip zero-padding from day in formatDate (day-first) All 13 tests pass. Remaining tsc bun:test errors are pre-existing in untouched test files.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes all failing tests in the monorepo. Suite went from 8 pass / 5 fail → 13 pass / 0 fail. The only source type error (
useThrottleTS2305) is resolved.Four cross-package bugs, one per hinted area:
apps/web/src/lib/api.tsuseDebounceand re-export asuseSearchDebounce; repaired theuseThrottleimport so@e2e/utilsexposes the namesapi.tsconsumes. Merged duplicate@e2e/utilsimports.packages/ui/src/components/Button/Button.tsxaria-labelto the rendered<button>for icon-only buttons (WCAG 2.2 SC 4.1.2).packages/ui/src/components/DataTable/DataTable.tsxsetStatein the sort handler to avoid a latent stale-closure across controlled re-renders.packages/utils/src/format/date.tsVerification
bun test packages/utils/test packages/ui/test apps/web/test --preload ./packages/ui/test/setup.ts→ 13 pass / 0 failnpx tsc --noEmit→ only 4 pre-existingCannot find module 'bun:test'errors, all in untouched test files (verified against a stash at HEAD). Resolving those would needbun-types/ a tsconfig edit — out of scope under the no-new-deps / no-test-edits constraints.Assumptions & constraints honoured
/^1/expectation (non-padded day-first) without altering month padding.reviewsubagent: approved, no blockers.